###############################################################################
#
#	Copyright (c) 2005, 2006 Siano Mobile Silicon Ltd. All rights reserved    
#                                                                       
#	PROPRIETARY RIGHTS of Siano Mobile Silicon are involved in the 
#	subject matter of this material.  All manufacturing, reproduction, 
#	use, and sales rights pertaining to this subject matter are governed 
#	by the license agreement.  The recipient of this software implicitly 
#	accepts the terms of the license.  
#
###############################################################################
#
#	File:		Makefile
#                                                                      
#	Brief:		This makefile builds the tdmb management console
#
###############################################################################

include ../../Platforms/Linux/Build/MakeEnv

.PHONY: all clean install

HOSTLIB_DIR := ../..
SMS_HOSTCTRLLIB_DIR := $(HOSTLIB_DIR)/Platforms/Linux/smsctrllib

CFLAGS += -g -DOS_LINUX 
CFLAGS += -I$(HOSTLIB_DIR)/Common/Include  -I$(HOSTLIB_DIR)/Include -I$(HOSTLIB_DIR)/Platforms/Include -I$(HOSTLIB_DIR)/Platforms/Linux

LDFLAGS += -L$(SMS_HOSTCTRLLIB_DIR) -lsmscontrol

CFLAGS += -DSMSHOSTLIB_MULTI_DEVICE_API

LDFLAGS += -L$(HOSTLIB_DIR)/Platforms/Linux/smsctrllib -lsmscontrol

# usage: make deploy, make clean
# make deploy creates the dr executable and copies it to specified directory
# make clean removes compilation targets. (not from the deployment directory

#set this variable to the place you want the build target to be copied to
DEPLOYMENT_DIR ?= /tmp

all: cmmb_demo_app

install: cmmb_demo_app
	@cp -v cmmb_demo_app $(BIN_DIR)

cmmb_demo_app: CmmbDemoApp.cpp
	$(CROSS_COMPILE)g++ $(CFLAGS) $(LDFLAGS) -o $@ $^

clean:
	@rm -f *~ \* cmmb_demo_app
